<?php /*a:3:{s:54:"G:\phpstudy_pro\WWW\tp\view\home\welcome\detailed.html";i:1604890064;s:51:"G:\phpstudy_pro\WWW\tp\view\home\common\static.html";i:1603931011;s:54:"G:\phpstudy_pro\WWW\tp\view\home\common\resources.html";i:1603609812;}*/ ?>
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title><?php echo htmlentities($system['hotel_name']); ?>(多酒店版)</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="/static/admin/css/font.css">
    <link rel="stylesheet" href="/static/admin/css/xadmin.css">
    <script src="/static/admin/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/admin/js/xadmin.js"></script>

    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/2.0.3/jquery.js"></script>
    <script src="/static/jquery.printarea.js"></script>

    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->


    <link href="/static/toastr/toastr.css" rel="stylesheet"/>
    <script src="/static/toastr/toastr.js"></script>

</head>
<input type="hidden" value="<?php echo htmlentities($voice['types']); ?>" id="voice">

<script>
    //语音播报
    function voice(name) {
        //判断语音是否开启
        if(<?php echo htmlentities($voice['status']); ?> === '0'){
            return false;
        }
        if($('#voice').val() === '思悦'){
            var audio= new Audio("/static/voice/siyue/"+name+".mp3");
        }else if($('#voice').val() === '若兮'){
            var audio= new Audio("/static/voice/ruoxi/"+name+".mp3");
        }else if($('#voice').val() === '艾琪'){
            var audio= new Audio("/static/voice/aiqi/"+name+".mp3");
        }else if($('#voice').val() === '艾美'){
            var audio= new Audio("/static/voice/aimei/"+name+".mp3");
        }else if($('#voice').val() === '艾悦'){
            var audio= new Audio("/static/voice/aiyue/"+name+".mp3");
        }else if($('#voice').val() === '青青'){
            var audio= new Audio("/static/voice/qingqing/"+name+".mp3");
        }else if($('#voice').val() === '翠姐'){
            var audio= new Audio("/static/voice/cuijie/"+name+".mp3");
        }else if($('#voice').val() === '姗姗'){
            var audio= new Audio("/static/voice/shanshan/"+name+".mp3");
        }else if($('#voice').val() === '小玥'){
            var audio= new Audio("/static/voice/xiaoyue/"+name+".mp3");
        }
        audio.play();//播放
    }
</script>
<!--<link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.0/css/bootstrap.css" rel="stylesheet">-->
<!--<link rel="stylesheet" href="/static/bootstrap/css/bootstrap.css">-->
<link href="/static/bootstrap3.0.css" rel="stylesheet" type="text/css"/>
<script src="/static/bootstrap/js/bootstrap.js"></script>
    <body>
        <div class="x-nav">
            <span class="layui-breadcrumb">
                <a href="">首页</a>
                <a href="">房间</a>
                <a>
                    <cite>账单明细</cite>
                </a>
            </span>
            <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
                <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
            </a>
        </div>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">数据统计</div>
                        <div class="layui-card-body ">
                            <ul class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog">
                                <li class="layui-col-md2 layui-col-xs6">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>房间数量</h3>
                                        <p>
                                            <cite><?php echo htmlentities($list['count']); ?></cite>
                                        </p>
                                    </a>
                                </li>
                                <li class="layui-col-md2 layui-col-xs6">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>总金额</h3>
                                        <p>
                                            <cite><?php echo htmlentities($list['income_details']); ?></cite>
                                        </p>
                                    </a>
                                </li>
                                <li class="layui-col-md2 layui-col-xs6">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>总定金</h3>
                                        <p>
                                            <cite><?php echo htmlentities($list['deposit_record']); ?></cite>
                                        </p>
                                    </a>
                                </li>
                                <li class="layui-col-md2 layui-col-xs6">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>活动优惠</h3>
                                        <p>
                                            <cite><?php echo htmlentities($list['activity_price']); ?></cite>
                                        </p>
                                    </a>
                                </li>
                                <li class="layui-col-md2 layui-col-xs6">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>会员折扣</h3>
                                        <p>
                                            <cite><?php echo htmlentities($list['member_price']); ?></cite>
                                        </p>
                                    </a>
                                </li>
                                <li class="layui-col-md2 layui-col-xs6 ">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>房间</h3>
                                        <p>
                                            <cite><?php echo htmlentities($room_arr); ?></cite>
                                        </p>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>

                <div class="layui-col-md12">
                    <div class="layui-card" id="a2">
                        <div class="layui-card-body ">
                            <table class="layui-table layui-form">
                                <thead>
                                    <tr>
                                        <th>房间数量</th>
                                        <th>总金额</th>
                                        <th>总定金</th>
                                        <th>活动优惠</th>
                                        <th>会员折扣</th>
                                        <th>应收价格</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td><?php echo htmlentities($list['count']); ?></td>
                                        <td><?php echo htmlentities($list['income_details']); ?></td>
                                        <td><?php echo htmlentities($list['deposit_record']); ?></td>
                                        <td><?php echo htmlentities($list['activity_price']); ?></td>
                                        <td><?php echo htmlentities($list['member_price']); ?></td>
                                        <td><?php echo htmlentities($list['price_receivable']); ?></td>
                                    </tr>
                                </tbody>
                            </table>
                            <input type="hidden" value="<?php echo htmlentities($room_arr); ?>" id="room_arr">
                        </div>
                    </div>
                    <button class="layui-btn" onclick="cancel()">
                        取消入住
                    </button>
                    <button class="layui-btn" onclick="define()">
                        <i class="layui-icon"></i>确认入住
                    </button>
                    <button class="layui-btn"  id="aa">
                        打印票据
                    </button>
                </div>

            </div>
        </div>
    </body>

<script>
    $(document).ready(function(){
        $("#aa").click(function(){
            $("#a2").printArea();
        });
    });
    //取消订单
    function cancel(){
        $.ajax({
            type:"post",
            url: "<?php echo url('home/welcome/cancel_order'); ?>",
            data: {
                room_arr:$('#room_arr').val(),
            },
            success: function(data){
                console.log(data);
                toastr.error(data.msg);
                if(data.code == 100){
                    setTimeout(function () {
                        layer.closeAll();
                        parent.location.reload();
                    },1500);
                }
            }});
    }

    function define() {
        voice('move');
        //右下弹出
        layer.open({
            type: 1
            ,offset: 'rb'
            ,content: '<div style="padding: 20px 80px;">房间入住成功</div>'
            ,btn: '关闭全部'
            ,btnAlign: 'c' //按钮居中
            ,shade: 0 //不显示遮罩
            ,anim: 2
            ,time: 1400
            ,yes: function(){
                layer.closeAll();
            }
        });
        setTimeout(function () {
            window.parent.frames.location.reload();
        },1500);
    }
</script>


</html>